package com.yl.module.property.domain.dto;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 建科http消息推送请求参数定义类
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "JiankePushDataDTO", description = "")
public class JiankePushDataDTO implements Serializable {

	@ApiModelProperty(value = "数据类型 1通信状态（是否离线）2告警状态（是否存在告警）3设备属性参数")
	@Range(min = 1, max = 4, message = "值必须在1到4之间")
	@NotNull(message = "参数type不能为空")
    private Integer type;

	@ApiModelProperty(value = "签名 用于验签")
	@NotBlank(message = "参数signature不能为空")
	private String signature;

	@ApiModelProperty(value = "设备唯一编码")
	@NotBlank(message = "参数propertyUniqueCode 不能为空")
	private String propertyUniqueCode;

	@ApiModelProperty(value = "数据体 json字符串 具体的数据结构会根据type的值来定")
	@NotBlank(message = "参数data 不能为空")
	private String data;




}




